﻿<phone:PhoneApplicationPage 
    x:Class="NASA.BeAMartian.Views.Learn.QuestionListPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitleGrid is the name of the application and page title-->
        <Image Source="/NASA.BeAMartian;component/Assets/Images/blk.png" Stretch="Fill" Grid.RowSpan="2"/>
        <Image Source="/NASA.BeAMartian;component/Assets/Images/399-260508-2204-6-3d-2-01-EchusChasma_L.jpg" Stretch="Fill" Grid.RowSpan="2" Opacity="0.4"/>

        <!--TitleGrid is the name of the application and page title-->
        <Grid x:Name="TitleGrid" Grid.Row="0">
            <Grid.Projection>
                <PlaneProjection/>
            </Grid.Projection>

            <TextBlock Text="" x:Name="textBlockPageTitle" Style="{StaticResource PhoneTextPageTitle1Style}"/>

        </Grid>

        <!--ContentGrid contains ListBox. Place additional content here-->
        <Grid x:Name="ContentGrid" Grid.Row="1">
            <Grid.Projection>
                <PlaneProjection/>
            </Grid.Projection>
            <ListBox x:Name="lbQuestions" ItemsSource="{Binding Items}" SelectionChanged="ListView_SelectionChanged" Style="{StaticResource PhoneListBox}" Margin="0,0,0,104">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Margin="2,2" VerticalAlignment="Top" Background="#FF1F1F1F">
                            <StackPanel Orientation="Horizontal">
                                <Image x:Name="imgResponseAvatar" HorizontalAlignment="Left"  Stretch="Fill" VerticalAlignment="Top" 
                                       Source="{Binding NuggetOriginator.Avatar}"   />
                                <TextBlock Margin="12,0,0,0" Foreground="White" FontSize="18"  VerticalAlignment="Top" 
                                           Text="{Binding Body}" TextWrapping="Wrap" Width="359"/>
                            </StackPanel>
                            <StackPanel Orientation ="Horizontal" >

                                <TextBlock Foreground="White" FontSize="14" Text="{Binding NuggetOriginator.DisplayName}" TextWrapping="Wrap" Height="23"/>
                                <TextBlock Text=" " />
                                <TextBlock Foreground="White" FontSize="14" Text="{Binding NuggetOriginator.UserReputationString}" TextWrapping="Wrap" Height="23"/>
                            </StackPanel>

                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <Button Content="Ask a Question" Height="70" HorizontalAlignment="Left" Margin="14,0,0,0" Name="btnAskAQuestion" 
                    VerticalAlignment="Bottom" Width="434" Click="btnAskAQuestion_Click" />

        </Grid>
    </Grid>
    <!--<phone:PhoneApplicationPage.ApplicationBar >

        <shell:ApplicationBar IsVisible="True">
            <shell:ApplicationBar.Buttons>
                <shell:ApplicationBarIconButton IconUri="/Images/icons/Categories.png" Text="Categories" x:Name="appbarCategories" Click="appbarCategories_Click"/>
                <shell:ApplicationBarIconButton IconUri="/Images/icons/Profile.png"  Text="Profile" x:Name="appbarProfile" Click="appbarProfile_Click"/>
                <shell:ApplicationBarIconButton IconUri="/Images/icons/Search.png"  Text="Search" x:Name="appbarSearch" Click="appbarSearch_Click"/>
                <shell:ApplicationBarIconButton IconUri="/Images/icons/More.png"  Text="More" x:Name="appbarMore" Click="appbarMore_Click"/>

            </shell:ApplicationBar.Buttons>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
